package io.renren.modules.dangan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * ${comments}
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2019-08-03 22:04:03
 */
@Data
@TableName("DA_SERVER")
public class DaServerEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 服务器序号
	 */
	@TableId(type = IdType.INPUT)
	private Integer serverxh;
	/**
	 * 服务器名字
	 */
	private String servername;
	/**
	 * 相对路径
	 */
	private String diskname;
	/**
	 * ip地址
	 */
	private String ipaddress;
	/**
	 * 用户名
	 */
	private String username;
	/**
	 * 密码
	 */
	private String password;
	/**
	 * 端口
	 */
	private Integer port;

	private String relativepath;

	public String getFilePathPrefix(){
		StringBuilder sb=new StringBuilder();
		if(StringUtils.isNotEmpty(diskname))
		{
			sb.append(diskname);
		}
		if(StringUtils.isNotEmpty(relativepath))
		{
			sb.append(relativepath);
		}
		return sb.toString();
	}
}
